<?php

use Phinx\Migration\AbstractMigration;

class AddFieldsToBusinessPartner extends AbstractMigration
{
    public function change()
    {
        $table = $this->table('business_partner');
        
        // 添加新字段
        $table->addColumn('business_type_id', 'integer', ['null' => true, 'comment' => '商家类型ID'])
              ->addColumn('service_level', 'string', ['limit' => 20, 'null' => true, 'default' => 'normal', 'comment' => '服务等级：normal=普通商家，vip=VIP商家'])
              ->addIndex(['business_type_id'])
              ->save();
    }
} 